package com.example.produces.service.impl;

import com.example.produces.entity.ZhangMu;
import com.example.produces.mapper.ZhangMuMapper;
import com.example.produces.service.ZhangMuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class ZhangMuImpl implements ZhangMuService {
    @Autowired
    private ZhangMuMapper zhangMuMapper;
    @Override
    public List<ZhangMu> findAll() {
        List<ZhangMu>zhangMus=zhangMuMapper.findAll();
        return zhangMus;
    }

    @Override
    public void add(ZhangMu zhangMu) {
            zhangMuMapper.add(zhangMu);
    }

    @Override
    public ZhangMu findOne(String surplus) {
        return zhangMuMapper.findOne(surplus);
    }

    @Override
    public void upDate(ZhangMu zhangMu) {
       zhangMuMapper.upDate(zhangMu);
    }

    @Override
    public void delete(String surplus) {
      zhangMuMapper.delete(surplus);
    }
}
